package com.cosmoplat.mom.iot.client.http;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author yotta
 * @date 2025/4/16 9:41
 */
@AllArgsConstructor
@Getter
public enum BodyType {

    FORM_DATA("application/x-www-form-urlencoded;charset=UTF-8"),
    JSON("application/json;charset=UTF-8"),
    XML("application/xml"),
    TEXT("text/plain"),
    MULTIPART("multipart/form-data");

    private String contentType;

    public void addHeader(HttpRequest request) {
        request.addHeader("Content-Type", contentType);
    }

}
